﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CokoNES.Tools
{
    public static class Memory
    {
        /// <summary>
        /// Copy the source array into the destination, according to other parameters
        /// </summary>
        /// <param name="source">The source array</param>
        /// <param name="dest">The destination array</param>
        /// <param name="sourceOffset">Starting copy entry in source array</param>
        /// <param name="destOffset">Starting copy entry in destination offset</param>
        /// <param name="count">How many data will be copied</param>
        public static void MemsetAdv(byte[] source, byte[] dest, int sourceOffset, int destOffset, int count)
        {
            for (var i = 0; i < count; i++)
            {
                dest[i + destOffset] = source[i + sourceOffset];
            }
        }
    }
}
